/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-05-24
 * Time: 14:29
 */
//通过代码交换2个数
public class Test {
    public static void main(String[] args) {
        int a=111;
        int b=999;
        {
            int c=0;
            c=a;
            a=b;
            b=c;
            System.out.println(a+"  "+b);
        }
        {
            a=a+b;
            b=a-b;
            a=a-b;
            System.out.println(a+"  "+b);
        }
        {
            a=a^b;
            b=a^b;
            a=a^b;
            System.out.println(a+"  "+b);
        }
    }
}
